/**
 *
 * Created by er on 17-7-16.
 */
$(function () {
    loadMoulds();
    /**
     * 加载题的类型
      */
   function loadMoulds() {
       var action = '/mouleAction/getMoulds';
       $.post(action,function (data) {
           var html = '';
           html+='<div class="accordion" id="accordion-958563">';
            $('#accordion-span3').innerHTML="";
            for (var i=0;i<data.length;i++){
                var rand = parseInt(Math.random() * 100000+parseInt(Math.random()));
                html+='<div class="accordion-group">';
                html+='<div class="accordion-heading">';
                html+='<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion-958563" href="#accordion-element-'+rand+'">'+data[i].name+'</a>';
                html+='</div>';
                html+='<div id="accordion-element-'+rand+'" class="accordion-body collapse">';

                html+='<div class="accordion-inner">'+'功能块...'+'</div>';
                html+='</div>';
                html+='</div>';
            }
            html+='</div>';
           $('#accordion-span3').append(html);
       })
    }




});